	.text
maior:
	PUSH BP
	ADDI BP, SP, 0
	ADDI SP, SP, 0
	LW R1, BP, 8
	LW R2, BP, 12
	CMP R1, R2
	JGT L0
	JMP L1
L0:
	ADDI SP, SP, 0
	LW R3, BP, 8
	ADD RV, R3, R0
	ADDI SP, BP, 0
	POP BP
	RET
L1:
	LW R4, BP, 12
	ADD RV, R4, R0
	ADDI SP, BP, 0
	POP BP
	RET
maior3:
	PUSH BP
	ADDI BP, SP, 0
	ADDI SP, SP, 0
	LW R5, BP, 16
	PUSH R5
	LW R6, BP, 12
	PUSH R6
	CALL maior
	ADDI SP, SP, 8
	PUSH RV
	LW R7, BP, 8
	PUSH R7
	CALL maior
	ADDI SP, SP, 8
	ADD RV, RV, R0
	ADDI SP, BP, 0
	POP BP
	RET
__start:
	ADDI SP, SP, -16
	ADDI R8, R0, 12
	SW R8, BP, -4
	ADDI R9, R0, 77
	SW R9, BP, -8
	ADDI R10, R0, 8
	SW R10, BP, -12
	LW R11, BP, -12
	PUSH R11
	LW R12, BP, -8
	PUSH R12
	LW R13, BP, -4
	PUSH R13
	CALL maior3
	ADDI SP, SP, 12
	SW RV, BP, -16
	ADDI R14, R0, L2
	PUSH R14
	PUSHI 1
	SYSCALL
	ADDI SP, SP, 8
	LW R15, BP, -16
	PUSH R15
	PUSHI 0
	SYSCALL
	ADDI SP, SP, 8
	STOP
	.data
	L2:	"O maior dos tres e "
